import index from '../components/index'
let routes =[
    {
        path:'/',
        component:index,
        children:[
            {
                //首页
                path:"/",
                component:()=>import('../components/main')
            },
            {
                //商品详情页
                path:'/details',
                component:()=>import('../components/details')
            },
            {
                //购物车
                path:'/cart',
                component:()=>import('../components/cart')
            },
            {   
                //我的订单
                path:'/order',
                component:()=>import('../components/order')
            },
            {
                //订单详情
                path:'/Orderdetails',
                component:()=>import('../components/Orderdetails')
            },
            {
                //订单结算页
                path:'/payment',
                component:()=>import('../components/payment')
            },
            {
                //服饰鞋包分类页
                path:'/clothes',
                component:()=>import('../components/clothes')
            },
            {
                //家具生活分类页
                path:'/homelife',
                component:()=>import('../components/homelife')
            },
            {
                //电子数码分类页
                path:'/electronic',
                component:()=>import('../components/electronic')
            },
            {
                //电子书分类页
                path:'/book',
                component:()=>import('../components/book')
            },
            {
                // 食品分类页
                path:'/food',
                component:()=>import('../components/food')
            },
            {
                path:'/address',
                component:()=>import('../components/address')
            }
        ]
    },
    {
        path:'/login',
        component:()=>import('../views/login')
    },
    {
        path:'/register',
        component:()=>import('../views/register')
    },
]
export default routes